Skill - Instant
A skill that will activate when pushing down the trigger button.
Remember: Instant skill
should be checked in the InteractTriggerX
component for a skill to be instant.
Example
local table = {}
function table:UpdateSkill()
local shootInterval = self.shootInterval or 0.1
local st = self.shootTime or 0
local ct = UE.Time.time
if ct - st < shootInterval then
return
end
self:PullTrigger()
end
function table:PullTrigger()
print("Instant skill triggered!")
end
return Class(nil,nil,table)
User Variables
Component | variable | optional |
---|---|---|
int | self.shootInterval | yes |
int | self.shootTime | yes |